<?php

class Model_Person extends Base_Model
{
    protected $_tableName = 'Table_Person';
    
	protected $_fields = array(
			'pid','fid','vid','gid','village','group','name','master','gender','national','id_number','birth_date','marital_status','education','account_nature','account_status','archiving_reason','archiving_created','relationship','policy_type','statistics_type','management_type','marriage_date','marriage_first','work','work_units','account_place','living_place','drop_reasons','drop_date','death_date','measure'
		);


    protected function filterFid()
    {
        if ($this->fid) {
            $dbTable = new Table_Person();
            $result = $dbTable->read($this->fid);
            if (!$result) {
                throw new Base_Model_Exception(
                    'Family not exist', 1234
                );
            }
        }
    }
}